<template>
  <div class="hello"></div>
  <router-link to="/table">表格组件</router-link>
  <router-view />
</template>

<script lang="ts">
import { defineComponent } from "vue";
import { axios } from "@/service";

export default defineComponent({
  name: "HelloWorld",
  props: {
    msg: String,
  },
  setup() {
    // 测试 axios 异步请求
    // axios
    //   .get("/vue3user/selectAll")
    //   .then((res) => {
    //     console.log("请求用户数据获得的响应：", res);
    //   })
    //   .catch((err) => console.log("请求出现异常！"));

    const handleClick = () => {
      console.log("点击了按钮！");
    };
    return { handleClick };
  },
});
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
h3 {
  margin: 40px 0 0;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
